home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 15 / macformat_15.iso / C de cerca / Codewarrior Lite / MacOS Support / Headers / ANSI Headers / time.h < prev    next >
Text File  |  1995-12-29  |  1KB  |  79 lines

  1. /* timm.h standard header */
  2. #ifndef _TIME
  3. #define _TIME
  4. #ifndef _YVALS
  5. #include <yvals.h>
  6. #endif
  7.  
  8. #if __MWERKS__
  9. #pragma options align=mac68k
  10.  
  11. #if __CFM68K__ && __USING_IMPORTED_ANSI__
  12. #pragma import on
  13. #endif
  14. #endif
  15.  
  16.         /* macros */
  17. #ifndef NULL
  18. #define NULL    _NULL
  19. #endif
  20. #define CLOCKS_PER_SEC    _CPS
  21.         /* type definitions */
  22. #ifndef _SIZET
  23. #define _SIZET
  24. typedef _Sizet size_t;
  25. #endif
  26. #if !__MWERKS__
  27. typedef unsigned int clock_t;
  28. #else /* __MWERKS__ */
  29. typedef unsigned long clock_t;
  30. #endif /* __MWERKS__ */
  31. typedef unsigned long time_t;
  32. struct tm {
  33.     int tm_sec;
  34.     int tm_min;
  35.     int tm_hour;
  36.     int tm_mday;
  37.     int tm_mon;
  38.     int tm_year;
  39.     int tm_wday;
  40.     int tm_yday;
  41.     int tm_isdst;
  42.     };
  43.  
  44. _EXTERN_C    /* low-level functions */
  45. time_t time(time_t *);
  46. _END_EXTERN_C
  47.  
  48. _C_LIB_DECL    /* declarations */
  49. char *asctime(const struct tm *);
  50. clock_t clock(void);
  51. char *ctime(const time_t *);
  52. double difftime(time_t, time_t);
  53. struct tm *gmtime(const time_t *);
  54. struct tm *localtime(const time_t *);
  55. time_t mktime(struct tm *);
  56. size_t strftime(char *, size_t, const char *,
  57.     const struct tm *);
  58. _END_C_LIB_DECL
  59.  
  60. #if __MWERKS__
  61. #if __CFM68K__ && __USING_IMPORTED_ANSI__
  62. #pragma import reset
  63. #endif
  64.  
  65. #pragma options align=reset
  66. #endif
  67.  
  68. #endif
  69.  
  70. /*
  71.  * Copyright (c) 1994 by P.J. Plauger.  ALL RIGHTS RESERVED. 
  72.  * Consult your license regarding permissions and restrictions.
  73.  */
  74.  
  75. /* Change log:
  76.  *94June04 PlumHall baseline
  77.  *94Oct07 Inserted MW changes.
  78.  */
  79.